from django.db import models

# Create your models here.
class TipoDeCriptografia(models.Model):
    nome = models.CharField(max_length=256)
    desc = models.TextField()
    
    def __unicode__(self):
        return self.nome


class Tags(models.Model):
    nomeTag = models.CharField(max_length=256)
    
    def __unicode__(self):
        return self.nomeTag

class Arquivo (models.Model):
    pasta = models.CharField(max_length=256)
    md5 = models.CharField(max_length=256)
    nomeOriginal = models.CharField(max_length=256)
    tamanho = models.BigIntegerField()
    tipoCriptografia = models.ForeignKey(TipoDeCriptografia)
    tag = models.ManyToManyField(Tags)
    
    
    def __unicode__ (self):
        return self.nomeOriginal
    
    
    

